home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 March / EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso / earcd / patches / pgs3g1.lha / 3.0gUpdate / Macros.LHA / TechReport.rexx < prev   
OS/2 REXX Batch file  |  1995-03-24  |  11KB  |  367 lines

  1. /* $VER: TechReport.rexx 1.0g (24.03.95)
  2.    Copyright 1995 Soft-Logik Publishing Corporation
  3.    May not be distributed without Soft-Logik Publishing Corporation's express written permission */
  4.  
  5. /* SAME OLD STUFF */
  6. OPTIONS RESULTS
  7. TRACE OFF
  8. ADDRESS COMMAND
  9. /* Make sure rexx support is opened */
  10. IF ~SHOW('L','rexxsupport.library') THEN
  11.    CALL ADDLIB('rexxsupport.library',0,-30)
  12.  
  13. /* DEFINITIONS AND REPORT SETUP */
  14. ofilename='ram:Report.TEXT'
  15. tfilename='t:Report.TEMP'
  16.  
  17. if ~open(.ofile, ofilename, 'W') then return 9
  18. call writeln(.ofile, 'PAGESTREAM 3.0 TECHNICAL SUPPORT REPORT')
  19. call writeln(.ofile, '---------------------------------------')
  20.  
  21. ADDRESS PAGESTREAM
  22. openbusyrequester message "'Preparing report...'" thermometer enabled abort enabled total 100 current 0
  23. bh=result
  24. ADDRESS COMMAND
  25.  
  26.  
  27. /* MAIN LOOP */
  28. call REGINFO()
  29.     call SETBUSY (2)
  30. call SYSTEMINFO()
  31.     call SETBUSY (5)
  32. call HELPSYSTEM()
  33.     call SETBUSY (8)
  34. call ASSIGNS()
  35.     call SETBUSY (10)
  36. call PROGRAMS()
  37.     call SETBUSY (30)
  38. call LIBS()
  39.     call SETBUSY (35)
  40. call FILTERS()
  41.     call SETBUSY (65)
  42. call EFFECTS()
  43.     call SETBUSY (70)
  44. call PRINTERS()
  45.     call SETBUSY (80)
  46. call ENGINES()
  47.     call SETBUSY (95)
  48. call SPECIAL()
  49. call COLORS()
  50.     call SETBUSY (100)
  51. call CLEANUP(0)
  52.  
  53. REGINFO:
  54. call writeln(.ofile, '')
  55. call writeln(.ofile, 'USER INFORMATION:')
  56. if ~open(.tfile, 'PageStream3:PageStream3.prefs', 'R') then rcode=9
  57.     else rcode=0
  58. user.name='Unknown'
  59. user.comp='Unknown'
  60. user.regn='Unknown'
  61. if rcode=0 then do
  62.     do until eof(.tfile)
  63.         temp=(readln(.tfile))
  64.         if left(temp,8)='USERNAME' then user.name=subword(temp,2)
  65.         if left(temp,8)='USERCOMP' then user.comp=subword(temp,2)
  66.         if left(temp,8)='USERREGN' then user.regn=subword(temp,2)
  67.     end
  68.     call close(.tfile)
  69. end
  70. call writeln(.ofile, '  User Name................. '||user.name)
  71. call writeln(.ofile, '  Company................... '||user.comp)
  72. call writeln(.ofile, '  Registration Number....... '||user.regn)
  73. return rcode
  74.  
  75. SYSTEMINFO:
  76. call writeln(.ofile, '')
  77. call writeln(.ofile, 'SYSTEM INFORMATION:')
  78. 'version >'||tfilename
  79. temp=GETTEMP()
  80. call writeln(.ofile, '  '||temp)
  81. 'cpu >'||tfilename
  82. temp=GETTEMP()
  83. call writeln(.ofile, '  '||temp)
  84. call writeln(.ofile, '')
  85. 'avail >'||tfilename
  86. if ~open(.tfile, tfilename, 'R') then return 9
  87. do 4
  88.     temp=readln(.tfile)
  89.     call writeln(.ofile, '  '||temp)
  90. end
  91. call close(.tfile)
  92. return
  93.  
  94. HELPSYSTEM:
  95. call writeln(.ofile, '')
  96. call writeln(.ofile, 'HELP SYSTEM:')
  97. if exists('libs:amigaguide.library') then do
  98.     'version libs:amigaguide.library >'||tfilename
  99.     temp=GETTEMP()
  100.     parse var temp dum ver .
  101.     call writeln(.ofile, '  AmigaGuide.library........ v'||ver)
  102. end
  103. else call writeln(.ofile, '  AmigaGuide.library........ MISSING!')
  104. if exists('sys:Utilities/AmigaGuide') then do
  105.     'version sys:utilities/amigaguide >'||tfilename
  106.     temp=GETTEMP()
  107.     parse var temp dum ver .
  108.     call writeln(.ofile, '  AmigaGuide program........ v'||ver)
  109.     agflag=1
  110. end
  111. else agflag=0
  112. if exists('sys:Utilities/Multiview') then do
  113.     'version sys:utilities/multiview >'||tfilename
  114.     temp=GETTEMP()
  115.     parse var temp dum ver .
  116.     call writeln(.ofile, '  MultiView program......... v'||ver)
  117.     mvflag=1
  118. end
  119. else mvflag=0
  120. if agflag=0 & mvflag=0 then call writeln(.ofile, '  AmigaGuide/Multiview...... MISSING!')
  121. return
  122.  
  123. ASSIGNS:
  124. call writeln(.ofile, '')
  125. call writeln(.ofile, 'ASSIGNS: (AmigaDOS assigns)')
  126.  
  127. /* find out if the softlogik: assign was made */
  128. slassign=showlist('a','SOFTLOGIK')
  129. if slassign=1 then do
  130.     'assign SoftLogik: exists >'||tfilename
  131.     if ~open(.tfile, tfilename, 'R') then return 9
  132.     temp=(readln(.tfile))
  133.     if pos('SOFTLOGIK',upper(temp))~=0 then do
  134.         parse var temp dum line
  135.         line=strip(line,'b')
  136.         call writeln(.ofile, '  SoftLogik................. '||line)
  137.     end
  138.     call close(.tfile)
  139. end
  140. else call writeln(.ofile, '  SoftLogik................. SoftLogik: ASSIGN NOT MADE!')
  141.  
  142. /* find out if the pagestream3: assign was made */
  143. pgsassign=showlist('a','PAGESTREAM3')
  144. if pgsassign=1 then do
  145.     'assign PageStream3: exists >'||tfilename
  146.     if ~open(.tfile, tfilename, 'R') then return 9
  147.     temp=(readln(.tfile))
  148.     if pos('PAGESTREAM3',upper(temp))~=0 then do
  149.         parse var temp dum line
  150.         line=strip(line,'b')
  151.         call writeln(.ofile, '  PageStream3............... '||line)
  152.     end
  153.     call close(.tfile)
  154. end
  155. else call writeln(.ofile, '  PageStream3............... PageStream3: ASSIGN NOT MADE!')
  156.  
  157. /* find out if the fonts assign addition was made */
  158. 'assign fonts: exists >'||tfilename
  159. if ~open(.tfile, tfilename, 'R') then return 9
  160. line=nul
  161. do until eof(.tfile)
  162.     temp=(readln(.tfile))
  163.     if pos('SOFTLOGIK',upper(temp))~=0 & pos('FONTS',upper(temp))~=0 then line=right(temp,length(temp)-pos('+',temp)-1)
  164. end
  165. if line=nul then call writeln(.ofile, '  Fonts..................... SoftLogik:Fonts add ASSIGN NOT MADE!')
  166. call close(.tfile)
  167. call writeln(.ofile, '  Fonts..................... '||line||' add')
  168. return
  169.  
  170. PROGRAMS:
  171. call writeln(.ofile, '')
  172. call writeln(.ofile, 'PROGRAM FILES:')
  173. if exists('PageStream3:PageStream3') then do
  174.     'version PageStream3:PageStream3 full >'||tfilename
  175.     temp=GETTEMP()
  176.     parse var temp dum ver ver2 ver3 .
  177.     if ver3='' then ver2=ver3
  178.     /* for technical reasons, PageStream has version numbers of PageStream3 1.0 instead of PageStream 3.0. Let's make it easier on the user by changing this for the report. */
  179.     ver='3'||right(ver,length(ver)-1)
  180.     if ver2='' then ver2=' '
  181.     call writeln(.ofile, '  PageStream3 program....... v'||ver||' 'ver2)
  182. end
  183. else call writeln(.ofile, '  PageStream3 program....... MISSING!')
  184. if exists('PageStream3:BME') then do
  185.     'version PageStream3:BME >'||tfilename
  186.     temp=GETTEMP()
  187.     parse var temp dum ver ver2 .
  188.     if ver2='' then ver2=' '
  189.     call writeln(.ofile, '  BME program............... v'||ver||' 'ver2)
  190. end
  191. else call writeln(.ofile, '  BME program............... MISSING!')
  192. if exists('PageStream3:PageLiner') then do
  193.     'version PageStream3:PageLiner >'||tfilename
  194.     temp=GETTEMP()
  195.     parse var temp dum ver ver2 .
  196.     if ver2='' then ver2=' '
  197.     call writeln(.ofile, '  PageLiner program......... v'||ver||' 'ver2)
  198. end
  199. else call writeln(.ofile, '  PageLiner program......... MISSING!')
  200. return
  201.  
  202. LIBS:
  203. call writeln(.ofile, '')
  204. call writeln(.ofile, 'SOFTLOGIK:LIBS (program libraries)')
  205. if exists('SoftLogik:Libs/softlogik_app.library') then 'version SoftLogik:Libs/softlogik_app.library >'||tfilename
  206. temp=GETTEMP()
  207. parse var temp dum ver .
  208. call writeln(.ofile, '  softlogik_app.library..... v'||ver)
  209. if exists('SoftLogik:Libs/softlogik_obj.library') then 'version SoftLogik:Libs/softlogik_obj.library >'||tfilename
  210. temp=GETTEMP()
  211. parse var temp dum ver .
  212. call writeln(.ofile, '  softlogik_obj.library..... v'||ver)
  213. if exists('SoftLogik:Libs/softlogik_rsrc.library') then 'version SoftLogik:Libs/softlogik_rsrc.library >'||tfilename
  214. temp=GETTEMP()
  215. parse var temp dum ver .
  216. call writeln(.ofile, '  softlogik_rsrc.library.... v'||ver)
  217. if exists('SoftLogik:Libs/slarexxsupport.library') then 'version SoftLogik:Libs/slarexxsupport.library >'||tfilename
  218. temp=GETTEMP()
  219. parse var temp dum ver .
  220. call writeln(.ofile, '  slarexxsupport.library.... v'||ver)
  221. return
  222.  
  223. FILTERS:
  224. call writeln(.ofile, '')
  225. call writeln(.ofile, 'SOFTLOGIK:FILTERS (filter modules)')
  226. if exists('SoftLogik:filters') then do
  227.     call GETFILES('softlogik:filters')
  228.     call SAYVERS('softlogik:filters')
  229.     end
  230. else do
  231.     call writeln(.ofile, '- Filters directory MISSING!')
  232. end
  233. return
  234.  
  235. EFFECTS:
  236. call writeln(.ofile, '')
  237. call writeln(.ofile, 'SOFTLOGIK:EFFECTS (effect modules)')
  238. if exists('SoftLogik:effects') then do
  239.     call GETFILES('softlogik:effects')
  240.     call SAYVERS('softlogik:effects')
  241.     end
  242. else do
  243.     call writeln(.ofile, '- Effects directory MISSING!')
  244. end
  245. return
  246.  
  247. PRINTERS:
  248. call writeln(.ofile, '')
  249. call writeln(.ofile, 'SOFTLOGIK:PRINTERS (printer drivers)')
  250. if exists('SoftLogik:printers') then do
  251.     call GETFILES('softlogik:printers')
  252.     call SAYVERS('softlogik:printers')
  253.     end
  254. else do
  255.     call writeln(.ofile, '- Printers directory MISSING!')
  256. end
  257. return
  258.  
  259. SPECIAL:
  260. call writeln(.ofile, '')
  261. call writeln(.ofile, 'SOFTLOGIK:SPECIAL (miscellaneous modules)')
  262. if exists('SoftLogik:special') then do
  263.     call GETFILES('softlogik:special')
  264.     call SAYVERS('softlogik:special')
  265.     end
  266. else do
  267.     call writeln(.ofile, '- Special directory MISSING!')
  268. end
  269. return
  270.  
  271. ENGINES:
  272. call writeln(.ofile, '')
  273. call writeln(.ofile, 'SOFTLOGIK:ENGINES (font and text code modules)')
  274. if exists('SoftLogik:engines') then do
  275.     call GETFILES('softlogik:engines')
  276.     call SAYVERS('softlogik:engines')
  277.     end
  278. else do
  279.     call writeln(.ofile, '- Engines directory MISSING!')
  280. end
  281. return
  282.  
  283. COLORS:
  284. call writeln(.ofile, '')
  285. call writeln(.ofile, 'SOFTLOGIK:COLORS (color libraries)')
  286. if exists('SoftLogik:colors') then do
  287.     call GETFILES('softlogik:colors')
  288.     call SAYVERS('softlogik:colors')
  289.     end
  290. else do
  291.     call writeln(.ofile, '- Colors directory MISSING!')
  292. end
  293. return
  294.  
  295.  
  296. GETTEMP:
  297.     if ~open(.tfile, tfilename, 'R') then return 9
  298.     temp=readln(.tfile)
  299.     call close(.tfile)
  300. return temp
  301.  
  302. GETFILES:
  303.     parse arg path
  304.     Files=showdir(path,file,'|')
  305.     fLength=length(Files)
  306.     nList=0
  307.     DO WHILE fLength>0
  308.         cLength=pos('|',Files)
  309.         IF cLength=0 then DO
  310.             cLength=FLength+1
  311.             fLength=0
  312.         END
  313.         cFile=left(Files,cLength-1)
  314.         eFile=right(cFile,cLength-lastpos('.',cFile))
  315.         IF eFile~='.info' THEN DO
  316.             nList=nList+1
  317.             List.nList=cFile
  318.         END
  319.         IF FLength~=0 THEN Files=right(Files,fLength-cLength)
  320.         fLength=fLength-cLength
  321.     END
  322. return
  323.  
  324. SAYVERS:
  325.     parse arg path
  326.     do count=1 to nlist
  327.         if right(list.count,5)~='.info' then do
  328.             if upper(right(list.count,8))='FONTLIST' | upper(list.count)='POSTSCRIPT.EHANDLER' | upper(right(list.count,6))='HEADER' | upper(right(list.count,10))='DICTIONARY' | upper(left(list.count,7))='PANTONE' | upper(left(list.count,7))='CRAYONS' then do
  329.                 'list "'||path||'/'list.count||'" lformat %l >'||tfilename
  330.                 ver=' '||GETTEMP()||' bytes'
  331.             end
  332.             else do
  333.                 'version '||path||'/'||list.count||' >'||tfilename
  334.                 temp=GETTEMP()
  335.                 parse var temp dum ver ver2 .
  336.                 if ver2='' then ver2=' '
  337.                 ver=' v'||ver||' '||ver2
  338.             end
  339.             call writeln(.ofile,substr('  '||list.count,1,28,'.')||ver)
  340.         end
  341.     end
  342. return
  343.  
  344.  
  345. SETBUSY:
  346.     parse arg value
  347.     ADDRESS PAGESTREAM
  348.     setbusyrequester bh current value
  349.     getbusyrequester bh
  350.     if result=1 then call CLEANUP(1)
  351.     ADDRESS COMMAND
  352. return
  353.  
  354.  
  355. CLEANUP:
  356.     parse arg value
  357.     call close(.ofile)
  358.     ADDRESS PAGESTREAM
  359.     closebusyrequester bh
  360.     ADDRESS COMMAND
  361.     if value=0 then do
  362.         'sys:utilities/multiview '||ofilename
  363.         if rc>0 then 'sys:utilities/amigaguide '||ofilename
  364.     end
  365.     'delete '||tfilename||' >NIL:'
  366. exit
  367.